package com.example.foo.admin.web.account;

import org.springframework.beans.BeanUtils;

import com.example.foo.UserLevelEnum;
import com.example.foo.account.model.AccountItem;
import com.example.foo.ftt.FttLevel;
import com.example.foo.ftt.model.FttUser;

public class AccountItemVO extends AccountItem {

	private static final long serialVersionUID = 1L;

	private final String acctcText;

	private final String drcrText;

	private final String roleLevel;

	private final FttLevel fttLevel;

	private final String roleLevelText;

	private final String fttLevelText;

	private final String cellphone;

	private final String idname;

	public AccountItemVO(AccountItem accountItem, FttUser fttUser) {
		BeanUtils.copyProperties(accountItem, this);
		this.acctcText = accountItem.getAcctc().text;
		this.drcrText = accountItem.getDrcr().text;
		this.roleLevel = fttUser.getRoleLevel();
		this.fttLevel = fttUser.getFttLevel();
		this.roleLevelText = UserLevelEnum.ofLevelId(fttUser.getRoleLevel()).levelName;
		this.fttLevelText = fttUser.getFttLevel().text;
		this.cellphone = fttUser.getCellphone();
		this.idname = fttUser.getIdname();
	}

	public String getAcctcText() {
		return acctcText;
	}

	public String getDrcrText() {
		return drcrText;
	}

	public String getRoleLevel() {
		return roleLevel;
	}

	public FttLevel getFttLevel() {
		return fttLevel;
	}

	public String getRoleLevelText() {
		return roleLevelText;
	}

	public String getFttLevelText() {
		return fttLevelText;
	}

	public String getCellphone() {
		return cellphone;
	}

	public String getIdname() {
		return idname;
	}

}
